{{include template('public/header','admin')}}
<body>
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <div class="search">
                    <div class="well">
                        <form class="form-inline" action="{{url()}}" method="get">
                            <div class="form-group">
                                <label for="roleid">角色</label>
                                {{showselectrole($search['roleid'])}}
                            </div>
                            <div class="form-group">
                                <label for="username">关键字</label>
                                <input type="text" class="form-control" id="search[username]" name="search[username]" value="{{$search.username}}" placeholder="请输入用户名\邮箱" maxlength="15" tabindex="2" />
                            </div>
                            <button type="submit" class="btn btn-primary"><i class="fa fa-search" aria-hidden="true"></i>搜索</button>
                            <a href="javascript:;"  onclick="layer_open('添加后台管理人员', '/admin/member/add', '700', '400')" class="btn btn-success"><i class="fa fa-fw fa-plus"></i>添加后台管理人员</a>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <form method="post" action="/admin/member/batchremove" class="form-inline" role="form">
                    <table id='MemberList' class="table table-condensed table-hover table-striped tablesorter table-fixed table-selectable">
                        <thead>
                            <tr>
                                <th style="width: 15px;">
                                    <input type="checkbox" name="chk" class="checkbox" onclick="checkAll('prefix', this.form, 'ids', 'chk')" />
                                </th>
                                <th>{{L('member_uid')}}</th>
                                <th>{{L('member_username')}}</th>
                                <th>{{L('member_email')}}</th>
                                <th>{{L('member_lastlogintime')}}</th>
                                <th>{{L('member_adminid')}}</th>
                                <th>{{L('member_status')}}</th>
                                <th>{{L('member_score')}}</th>
                                <th>{{L('member_dateline')}}</th>
                                <th>{{L('edit')}}</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{foreach $items as $item}}
                            <tr>
                                <td><input type="checkbox" class="checkbox" name="ids[]" value="{{$item.uid}}" /></td>
                                <td>{{$item.uid}}</td>
                                <td>{{$item.username}}</td>
                                <td>{{$item.email}}</td>
                                <td>{{date("Y-m-d H:i:s",$item.lastlogintime)}}</td>
                                <td>
                                    {{update_status('member','member','uid',$item.uid,'adminid',$item.adminid)}}
                                </td>
                                <td>
                                    {{update_status('member','member','uid',$item.uid,'status',$item.status)}}
                                </td>
                                <td><input id="amount[]" value="{{$item.amount}}" style="width: 50px;"/></td>
                                <td>{{date("Y-m-d H:i:s",$item.dateline)}}</td>
                                <td style="width: 15%">
                                    <a href="javascript:;" onclick="layer_confirm('/admin/member/reset_password/?uid={{$item.uid}}', '您确认要将登录密码重置为{{$default_password}}?<br>(系统设置里可以修改重置默认密码)')"  class="btn btn-warning btn-xs" style="text-decoration:none">重置密码</a>
                                    <a href="/admin/member/update/?uid={{$item.uid}}" class="btn btn-warning btn-xs">修改</a>
                                    <a href="javascript:;" onclick="layer_del('/admin/member/delete/?uid={{$item.uid}}')"  class="btn btn-danger btn-xs">删除</a>
                                </td>
                            </tr>
                            {{/foreach}}
                        </tbody>
                        <tr>
                            <td colspan="15">
                                <div class="form-inline " style="text-align: left;">
                                    <div  style="float: left;">
                                        <input type="checkbox" name="chkall" class="checkbox" onclick="checkAll('prefix', this.form, 'ids')" />{{L('chkall')}}
                                        <input type="radio" class="radio" id="optype_outer" name="optype" value="del" />{{L('delete')}}
                                        <input type="radio" class="radio" id="optype_outer" name="optype" value="role">设置角色
                                        {{showselectrole()}}
                                        <input type="submit" class="btn" name="sendsubmit" value="{{L('submit')}}" />
                                    </div>
                                    <div  style="float:right;">
                                        {{include template('public/page','admin')}}
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
</body>
</html>